package com.lhkj.ct.meta.modules.psychology.service;

import com.lhkj.ct.base.mybatis.extension.service.BatchHandleService;
import com.lhkj.ct.meta.modules.gauge.common.enums.GaugeType;
import com.lhkj.ct.meta.modules.psychology.model.entity.TblGaugeAnswer;

import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jobob
 * @since 2023-10-16
 */
public interface GaugeAnswerService extends BatchHandleService<TblGaugeAnswer> {

//    /**
//     * 保存作答进度
//     */
//    void saveProcess(String reportId, GaugeType type, List<TblGaugeAnswer> answerRecord);

    /**
     * 提交作答结果
     */
    void submit(String reportId, GaugeType type, List<TblGaugeAnswer> answerRecord);

    /**
     * 查询表的作答记录转化为 Map
     *
     * @return
     *          Map{ NO1:1， NO2:2 }
     */
    Map<String, Object> convertAnswers2FormData(@NotBlank(message = "报告编号不能为空") String rId,
                                                @NotBlank(message = "表编号不能为空") String gaugeId);
}
